﻿
using System.IO;

namespace DJY.Code.Excel
{
    public class NPOIMemoryStream : MemoryStream
    {
        /// <summary>
        /// 获取流是否关闭
        /// </summary>
        public bool AllowClose
        {
            get;set;
        }

        public NPOIMemoryStream(bool colse = false)
        {
            AllowClose = colse;
        }

        public override void Close()
        {
            if (AllowClose)
            {
                base.Close();
            }

        }
    }
}
